]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
telepathyClient: Fix removal of timestamp timeout source
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 9 Apr 2015 16:44:50 +0000 (18:44 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 10 Apr 2015 14:10:02 +0000 (16:10 +0200)
Timestamps were always handled by the notification rather than the source,
so that code never worked.

js/ui/components/telepathyClient.js

index 38b5347826923fec50cee8d849d7103606879e7b..1ad35423b455f6715091d3215d8d2e4a7fc7a8d9 100644 (file)
@@ -474,9 +474,6 @@ const ChatSource = new Lang.Class({
         this._contact.disconnect(this._notifyAvatarId);
         this._contact.disconnect(this._presenceChangedId);
 
-        if (this._timestampTimeoutId)
-            Mainloop.source_remove(this._timestampTimeoutId);
-
         this.parent(reason);
     },
 
@@ -604,6 +601,13 @@ const ChatNotification = new Lang.Class({
         this._timestampTimeoutId = 0;
     },
 
+    destroy: function(reason) {
+        if (this._timestampTimeoutId)
+            Mainloop.source_remove(this._timestampTimeoutId);
+        this._timestampTimeoutId = 0;
+        this.parent(reason);
+    },
+
     /**
      * appendMessage:
      * @message: An object with the properties:
@@ -686,6 +690,7 @@ const ChatNotification = new Lang.Class({
         // Reset the old message timeout
         if (this._timestampTimeoutId)
             Mainloop.source_remove(this._timestampTimeoutId);
+        this._timestampTimeoutId = 0;
 
         let message = { realMessage: props.group != 'meta',
                         showTimestamp: false };